//
//  UIButton+RoundButton.m
//  QunZhu
//
//  Created by 超群 on 15/8/24.
//  Copyright (c) 2015年 qunzhu.Team. All rights reserved.
//

#import "UIButton+RoundButton.h"

@implementation UIButton (RoundButton)
/**
 设置圆角
 */
- (void)setCornerRadius:(CGFloat)_cornerRadius
{
    self.layer.cornerRadius     = _cornerRadius;
    self.layer.masksToBounds    = YES;
}
/**
 设置成圆形
 */
- (void)setCornerRadiusRound
{
    self.layer.cornerRadius     = self.frame.size.height/2;
    self.layer.masksToBounds    = YES;
}

/**
 设置圆角与边缘的宽度和边缘的颜色
 */
- (void)setCornerRadius:(CGFloat)_cornerRadius layerWidth:(CGFloat )_layerWidth layerColor:(UIColor *)_layerColor
{
    self.layer.cornerRadius     = _cornerRadius;
    self.layer.masksToBounds    = YES;
    self.layer.borderWidth      = _layerWidth;
    self.layer.borderColor      = _layerColor.CGColor;
}
@end
